﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SqlOperate;
using AdminRights;
using Base;

public partial class Admin_Rights_ManagerTable : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //try
        //{
        //    try
        //    {
        //        if (!CheckRights("system", "A1"))
        //        {
        //            HandleErr("您没有对该功能的操作权限", "index_Center.aspx", "1");
        //            return;
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        HttpContext.Current.Response.Write(ex.Message);
        //    }

        //}
        //catch (Exception ex)
        //{
        //    HttpContext.Current.Response.Write(ex.Message);
        //}
    }
    protected void btnExecute_Click(object sender, EventArgs e)
    {
        try
        {
            string strSql = txtSql.Text.Trim();
            int flag = SqlHelper.ExecuteNonQuery(strSql);
            if (flag == -1)
                lblMessage.Text = "执行成功！";
            else
                lblMessage.Text = "执行失败！";
        }
        catch (Exception ex) {
            HttpContext.Current.Response.Write(ex.Message);
        }
    }
}
